package com.sskj.aikeeper.presenter;


import com.lzy.okgo.model.Response;
import com.sskj.aikeeper.hangqing.activity.NicknameActivity;
import com.sskj.common.base.HttpData;
import com.sskj.functions.presenter.BasePresenter;
import com.sskj.lib.http.JsonCallBack;

/**
 * @author Hey
 * Create at  2019/06/24
 */
public class NicknamePresenter extends BasePresenter<NicknameActivity> {

    public void setNichName(String nickname) {
        httpService.setNickName(nickname)
                .tag(this)
                .execute(new JsonCallBack<HttpData>(this) {
                    @Override
                    public void onSuccess(Response<HttpData> response) {
                        mView.setNicknameOK(nickname);
                    }
                });
    }
}
